#include "PauseState.h"
#include "Resources.h"
#include "Define.h"
#include "Controls.h"
#include "StateManager.h"

PauseState::PauseState() { _id = "PauseState"; _skipUpdate = 0; }

PauseState::~PauseState(void){}

void PauseState::update()
{
	if (_skipUpdate > 0)
	{
		decrementSkipCycle();
		return;
	}

	if (_inputManager->isKeyPressed(sf::Keyboard::P))
	{
		setActiveState(false);
		_stateManager->setInputUpdate("PlayState", true);
		_stateManager->setUpdateState("PlayState", true);
	}
}

void PauseState::draw(RenderManager* renderManager)
{
	renderManager->draw(_bg);
}

void PauseState::input()
{

}

void PauseState::initialize()
{

}

void PauseState::shutdown()
{

}

void PauseState::loadContent()
{
	char* id = "PAUSE_T";
	Resources::getSingletonPtr()->loadSprite(_bg, id);
	_bg.setPosition(VSW_05, VSH_05);
}

void PauseState::unloadContent()
{

}